/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package net.jonbuck.tassoo.model.impl;

import net.jonbuck.tassoo.model.AttachmentType;
import net.jonbuck.tassoo.model.TassooPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Attachment Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getArguments <em>Arguments</em>}</li>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getCommand <em>Command</em>}</li>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getExtension <em>Extension</em>}</li>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getIcon <em>Icon</em>}</li>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getName <em>Name</em>}</li>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getSelectionExpression <em>Selection Expression</em>}</li>
 *   <li>{@link net.jonbuck.tassoo.model.impl.AttachmentTypeImpl#getType <em>Type</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class AttachmentTypeImpl extends BaseObjectImpl implements AttachmentType {
	/**
	 * The default value of the '{@link #getArguments() <em>Arguments</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getArguments()
	 * @generated
	 * @ordered
	 */
	protected static final String ARGUMENTS_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getArguments() <em>Arguments</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getArguments()
	 * @generated
	 * @ordered
	 */
	protected String arguments = ARGUMENTS_EDEFAULT;

	/**
	 * The default value of the '{@link #getCommand() <em>Command</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCommand()
	 * @generated
	 * @ordered
	 */
	protected static final String COMMAND_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getCommand() <em>Command</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCommand()
	 * @generated
	 * @ordered
	 */
	protected String command = COMMAND_EDEFAULT;

	/**
	 * The default value of the '{@link #getExtension() <em>Extension</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExtension()
	 * @generated
	 * @ordered
	 */
	protected static final String EXTENSION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getExtension() <em>Extension</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExtension()
	 * @generated
	 * @ordered
	 */
	protected String extension = EXTENSION_EDEFAULT;

	/**
	 * The default value of the '{@link #getIcon() <em>Icon</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon()
	 * @generated
	 * @ordered
	 */
	protected static final String ICON_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getIcon()
	 * @generated
	 * @ordered
	 */
	protected String icon = ICON_EDEFAULT;

	/**
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected static final String NAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getName()
	 * @generated
	 * @ordered
	 */
	protected String name = NAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getSelectionExpression() <em>Selection Expression</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSelectionExpression()
	 * @generated
	 * @ordered
	 */
	protected static final String SELECTION_EXPRESSION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSelectionExpression() <em>Selection Expression</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSelectionExpression()
	 * @generated
	 * @ordered
	 */
	protected String selectionExpression = SELECTION_EXPRESSION_EDEFAULT;

	/**
	 * The default value of the '{@link #getType() <em>Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getType()
	 * @generated
	 * @ordered
	 */
	protected static final String TYPE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getType()
	 * @generated
	 * @ordered
	 */
	protected String type = TYPE_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected AttachmentTypeImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return TassooPackage.Literals.ATTACHMENT_TYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getArguments() {
		return arguments;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setArguments(String newArguments) {
		String oldArguments = arguments;
		arguments = newArguments;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__ARGUMENTS, oldArguments, arguments));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setName(String newName) {
		String oldName = name;
		name = newName;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__NAME, oldName, name));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getSelectionExpression() {
		return selectionExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSelectionExpression(String newSelectionExpression) {
		String oldSelectionExpression = selectionExpression;
		selectionExpression = newSelectionExpression;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__SELECTION_EXPRESSION, oldSelectionExpression, selectionExpression));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getType() {
		return type;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setType(String newType) {
		String oldType = type;
		type = newType;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__TYPE, oldType, type));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getCommand() {
		return command;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCommand(String newCommand) {
		String oldCommand = command;
		command = newCommand;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__COMMAND, oldCommand, command));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getExtension() {
		return extension;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setExtension(String newExtension) {
		String oldExtension = extension;
		extension = newExtension;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__EXTENSION, oldExtension, extension));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getIcon() {
		return icon;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setIcon(String newIcon) {
		String oldIcon = icon;
		icon = newIcon;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TassooPackage.ATTACHMENT_TYPE__ICON, oldIcon, icon));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case TassooPackage.ATTACHMENT_TYPE__ARGUMENTS:
				return getArguments();
			case TassooPackage.ATTACHMENT_TYPE__COMMAND:
				return getCommand();
			case TassooPackage.ATTACHMENT_TYPE__EXTENSION:
				return getExtension();
			case TassooPackage.ATTACHMENT_TYPE__ICON:
				return getIcon();
			case TassooPackage.ATTACHMENT_TYPE__NAME:
				return getName();
			case TassooPackage.ATTACHMENT_TYPE__SELECTION_EXPRESSION:
				return getSelectionExpression();
			case TassooPackage.ATTACHMENT_TYPE__TYPE:
				return getType();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case TassooPackage.ATTACHMENT_TYPE__ARGUMENTS:
				setArguments((String)newValue);
				return;
			case TassooPackage.ATTACHMENT_TYPE__COMMAND:
				setCommand((String)newValue);
				return;
			case TassooPackage.ATTACHMENT_TYPE__EXTENSION:
				setExtension((String)newValue);
				return;
			case TassooPackage.ATTACHMENT_TYPE__ICON:
				setIcon((String)newValue);
				return;
			case TassooPackage.ATTACHMENT_TYPE__NAME:
				setName((String)newValue);
				return;
			case TassooPackage.ATTACHMENT_TYPE__SELECTION_EXPRESSION:
				setSelectionExpression((String)newValue);
				return;
			case TassooPackage.ATTACHMENT_TYPE__TYPE:
				setType((String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case TassooPackage.ATTACHMENT_TYPE__ARGUMENTS:
				setArguments(ARGUMENTS_EDEFAULT);
				return;
			case TassooPackage.ATTACHMENT_TYPE__COMMAND:
				setCommand(COMMAND_EDEFAULT);
				return;
			case TassooPackage.ATTACHMENT_TYPE__EXTENSION:
				setExtension(EXTENSION_EDEFAULT);
				return;
			case TassooPackage.ATTACHMENT_TYPE__ICON:
				setIcon(ICON_EDEFAULT);
				return;
			case TassooPackage.ATTACHMENT_TYPE__NAME:
				setName(NAME_EDEFAULT);
				return;
			case TassooPackage.ATTACHMENT_TYPE__SELECTION_EXPRESSION:
				setSelectionExpression(SELECTION_EXPRESSION_EDEFAULT);
				return;
			case TassooPackage.ATTACHMENT_TYPE__TYPE:
				setType(TYPE_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case TassooPackage.ATTACHMENT_TYPE__ARGUMENTS:
				return ARGUMENTS_EDEFAULT == null ? arguments != null : !ARGUMENTS_EDEFAULT.equals(arguments);
			case TassooPackage.ATTACHMENT_TYPE__COMMAND:
				return COMMAND_EDEFAULT == null ? command != null : !COMMAND_EDEFAULT.equals(command);
			case TassooPackage.ATTACHMENT_TYPE__EXTENSION:
				return EXTENSION_EDEFAULT == null ? extension != null : !EXTENSION_EDEFAULT.equals(extension);
			case TassooPackage.ATTACHMENT_TYPE__ICON:
				return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
			case TassooPackage.ATTACHMENT_TYPE__NAME:
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
			case TassooPackage.ATTACHMENT_TYPE__SELECTION_EXPRESSION:
				return SELECTION_EXPRESSION_EDEFAULT == null ? selectionExpression != null : !SELECTION_EXPRESSION_EDEFAULT.equals(selectionExpression);
			case TassooPackage.ATTACHMENT_TYPE__TYPE:
				return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (arguments: ");
		result.append(arguments);
		result.append(", command: ");
		result.append(command);
		result.append(", extension: ");
		result.append(extension);
		result.append(", icon: ");
		result.append(icon);
		result.append(", name: ");
		result.append(name);
		result.append(", selectionExpression: ");
		result.append(selectionExpression);
		result.append(", type: ");
		result.append(type);
		result.append(')');
		return result.toString();
	}

} //AttachmentTypeImpl
